v8-preparser.h   v8-preparser.h 
// Copyright 2010 the V8 project authors. All rights reserved. // Copyright 2011 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without // Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are // modification, are permitted provided that the following conditions are
// met: // met:
// //
// * Redistributions of source code must retain the above copyright // * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer. // notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above // * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following // copyright notice, this list of conditions and the following
// disclaimer in the documentation and/or other materials provided // disclaimer in the documentation and/or other materials provided
// with the distribution. // with the distribution.
skipping to change at line 68 skipping to change at line 68
#if defined(__GNUC__) && (__GNUC__ >= 4) && defined(V8_SHARED) #if defined(__GNUC__) && (__GNUC__ >= 4) && defined(V8_SHARED)
#define V8EXPORT __attribute__ ((visibility("default"))) #define V8EXPORT __attribute__ ((visibility("default")))
#else // defined(__GNUC__) && (__GNUC__ >= 4) #else // defined(__GNUC__) && (__GNUC__ >= 4)
#define V8EXPORT #define V8EXPORT
#endif // defined(__GNUC__) && (__GNUC__ >= 4) #endif // defined(__GNUC__) && (__GNUC__ >= 4)
#endif // _WIN32 #endif // _WIN32
namespace v8 { namespace v8 {
class PreParserData { class V8EXPORT PreParserData {
public: public:
PreParserData(size_t size, const uint8_t* data) PreParserData(size_t size, const uint8_t* data)
: data_(data), size_(size) { } : data_(data), size_(size) { }
// Create a PreParserData value where stack_overflow reports true. // Create a PreParserData value where stack_overflow reports true.
static PreParserData StackOverflow() { return PreParserData(0, NULL); } static PreParserData StackOverflow() { return PreParserData(0, NULL); }
// Whether the pre-parser stopped due to a stack overflow. // Whether the pre-parser stopped due to a stack overflow.
// If this is the case, size() and data() should not be used. // If this is the case, size() and data() should not be used.
bool stack_overflow() { return size_ == 0u; } bool stack_overflow() { return size_ == 0u; }
// The size of the data in bytes. // The size of the data in bytes.
size_t size() const { return size_; } size_t size() const { return size_; }
// Pointer to the data. // Pointer to the data.
const uint8_t* data() const { return data_; } const uint8_t* data() const { return data_; }
private: private:
const uint8_t* const data_; const uint8_t* const data_;
skipping to change at line 92 skipping to change at line 92
// Pointer to the data. // Pointer to the data.
const uint8_t* data() const { return data_; } const uint8_t* data() const { return data_; }
private: private:
const uint8_t* const data_; const uint8_t* const data_;
const size_t size_; const size_t size_;
}; };
// Interface for a stream of Unicode characters. // Interface for a stream of Unicode characters.
class UnicodeInputStream { class V8EXPORT UnicodeInputStream { // NOLINT - Thinks V8EXPORT is class n ame.
public: public:
virtual ~UnicodeInputStream(); virtual ~UnicodeInputStream();
// Returns the next Unicode code-point in the input, or a negative value when // Returns the next Unicode code-point in the input, or a negative value when
// there is no more input in the stream. // there is no more input in the stream.
virtual int32_t Next() = 0; virtual int32_t Next() = 0;
}; };
// Preparse a JavaScript program. The source code is provided as a // Preparse a JavaScript program. The source code is provided as a
// UnicodeInputStream. The max_stack_size limits the amount of stack // UnicodeInputStream. The max_stack_size limits the amount of stack
 End of changes. 5 change blocks. 
4 lines changed or deleted 4 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/