return LanguageModeField::decode(flags_);
}
bool is_in_loop() const { return IsInLoop::decode(flags_); }
+ bool is_qml_mode() const { return IsQmlMode::decode(flags_); }
FunctionLiteral* function() const { return function_; }
Scope* scope() const { return scope_; }
Scope* global_scope() const { return global_scope_; }
ASSERT(is_lazy());
flags_ |= IsInLoop::encode(true);
}
+ void MarkAsQmlMode() {
+ flags_ |= IsQmlMode::encode(true);
+ }
void MarkAsNative() {
flags_ |= IsNative::encode(true);
}
ASSERT(language_mode() == CLASSIC_MODE);
SetLanguageMode(shared_info_->language_mode());
}
+ if (!shared_info_.is_null() && shared_info_->qml_mode()) {
+ MarkAsQmlMode();
+ }
}
void SetMode(Mode mode) {
// If compiling for debugging produce just full code matching the
// initial mode setting.
class IsCompilingForDebugging: public BitField<bool, 8, 1> {};
-
+ // Qml mode
+ class IsQmlMode: public BitField<bool, 9, 1> {};
unsigned flags_;
v8::Extension* extension,
ScriptDataImpl* pre_data,
Handle<Object> script_data,
- NativesFlag is_natives_code);
+ NativesFlag is_natives_code,
+ v8::Script::CompileFlags = v8::Script::Default);
// Compile a String source within a context for Eval.
static Handle<SharedFunctionInfo> CompileEval(Handle<String> source,
Handle<Context> context,
bool is_global,
LanguageMode language_mode,
- int scope_position);
+ int scope_position,
+ bool qml_mode);
// Compile from function info (used for lazy compilation). Returns true on
// success and false if the compilation resulted in a stack overflow.