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

Unified Diff: src/runtime.cc

Issue 8344082: Replace boolean indications of strict mode by an enum value. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Some fixes and adapted the preparser. Created 9 years, 2 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
« src/compiler.cc ('K') | « src/runtime.h ('k') | src/scopes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index c5416ace81ef0f876c948ee582da51e15462993e..96182aad45a9b0d06384cfb9ecd88389c55b680a 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -1288,10 +1288,10 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DeclareGlobals) {
// non-deletable. However, neither SpiderMonkey nor KJS creates the
// property as read-only, so we don't either.
int attr = NONE;
- if ((flags & kDeclareGlobalsEvalFlag) == 0) {
+ if (!DeclareGlobalsEvalFlag::decode(flags)) {
attr |= DONT_DELETE;
}
- bool is_native = (flags & kDeclareGlobalsNativeFlag) != 0;
+ bool is_native = DeclareGlobalsNativeFlag::decode(flags);
if (is_const_property || (is_native && is_function_declaration)) {
attr |= READ_ONLY;
}
@@ -1316,9 +1316,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DeclareGlobals) {
value,
attributes));
} else {
- StrictModeFlag strict_mode =
- ((flags & kDeclareGlobalsStrictModeFlag) != 0) ? kStrictMode
- : kNonStrictMode;
+ StrictModeFlag strict_mode = DeclareGlobalsStrictModeFlag::decode(flags);
RETURN_IF_EMPTY_HANDLE(isolate,
SetProperty(global,
name,
« src/compiler.cc ('K') | « src/runtime.h ('k') | src/scopes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698