Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Unified Diff: src/parser.h

Issue 1161393007: OLD type Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects-inl.h ('k') | src/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.h
diff --git a/src/parser.h b/src/parser.h
index 05961414098186770fe538b6c0df619daedd78f4..dadb58c9159674e211ad54b8b3c1dfcbe44355ef 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -53,6 +53,8 @@ class ParseInfo {
FLAG_ACCESSOR(kGlobal, is_global, set_global)
FLAG_ACCESSOR(kStrictMode, is_strict_mode, set_strict_mode)
FLAG_ACCESSOR(kStrongMode, is_strong_mode, set_strong_mode)
+ FLAG_ACCESSOR(kAsmFunction, is_asm_function, set_asm_function)
+ FLAG_ACCESSOR(kAsmModule, is_asm_module, set_asm_module)
FLAG_ACCESSOR(kNative, is_native, set_native)
FLAG_ACCESSOR(kModule, is_module, set_module)
FLAG_ACCESSOR(kAllowLazyParsing, allow_lazy_parsing, set_allow_lazy_parsing)
@@ -147,6 +149,15 @@ class ParseInfo {
set_strong_mode(language_mode & STRONG_BIT);
}
+ AsmMode asm_mode() {
+ return construct_asm_mode(is_asm_function(), is_asm_module());
+ }
+ void set_asm_mode(AsmMode asm_mode) {
+ STATIC_ASSERT(ASM_END == 3);
+ set_asm_function(asm_mode & ASM_FUNCTION_BIT);
+ set_asm_module(asm_mode & ASM_MODULE_BIT);
+ }
+
void ReopenHandlesInNewHandleScope() {
closure_ = Handle<JSFunction>(*closure_);
shared_ = Handle<SharedFunctionInfo>(*shared_);
@@ -168,8 +179,10 @@ class ParseInfo {
kParseRestriction = 1 << 7,
kModule = 1 << 8,
kAllowLazyParsing = 1 << 9,
+ kAsmFunction = 1 << 10,
+ kAsmModule = 1 << 11,
// ---------- Output flags --------------------------
- kAstValueFactoryOwned = 1 << 10
+ kAstValueFactoryOwned = 1 << 12
};
//------------- Inputs to parsing and scope analysis -----------------------
@@ -215,6 +228,7 @@ class FunctionEntry BASE_EMBEDDED {
kLiteralCountIndex,
kPropertyCountIndex,
kLanguageModeIndex,
+ kAsmModeIndex,
kUsesSuperPropertyIndex,
kCallsEvalIndex,
kSize
@@ -233,6 +247,14 @@ class FunctionEntry BASE_EMBEDDED {
DCHECK(is_valid_language_mode(backing_[kLanguageModeIndex]));
return static_cast<LanguageMode>(backing_[kLanguageModeIndex]);
}
+
+ AsmMode asm_mode() {
+ DCHECK(backing_[kAsmModeIndex] == ASM_NO ||
+ backing_[kAsmModeIndex] == ASM_MODULE ||
+ backing_[kAsmModeIndex] == ASM_FUNCTION);
+ return static_cast<AsmMode>(backing_[kAsmModeIndex]);
+ }
+
bool uses_super_property() { return backing_[kUsesSuperPropertyIndex]; }
bool calls_eval() { return backing_[kCallsEvalIndex]; }
« no previous file with comments | « src/objects-inl.h ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698