]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - runtime/CommonIdentifiers.cpp
JavaScriptCore-1218.35.tar.gz
[apple/javascriptcore.git] / runtime / CommonIdentifiers.cpp
index 3837817d052f78ece061ac6de717104defb7b7eb..e19df1c6498526e367f6e0cf099e781e5eee9e31 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright (C) 2003, 2007, 2009 Apple Inc. All rights reserved.
+ *  Copyright (C) 2003, 2007, 2009, 2012 Apple Inc. All rights reserved.
  *
  *  This library is free software; you can redistribute it and/or
  *  modify it under the terms of the GNU Library General Public
 
 namespace JSC {
 
-static const char* const nullCString = 0;
+#define INITIALIZE_PROPERTY_NAME(name) , name(vm, #name)
+#define INITIALIZE_KEYWORD(name) , name##Keyword(vm, #name)
 
-#define INITIALIZE_PROPERTY_NAME(name) , name(globalData, #name)
-
-CommonIdentifiers::CommonIdentifiers(JSGlobalData* globalData)
-    : nullIdentifier(globalData, nullCString)
-    , emptyIdentifier(globalData, "")
-    , underscoreProto(globalData, "__proto__")
-    , thisIdentifier(globalData, "this")
+CommonIdentifiers::CommonIdentifiers(VM* vm)
+    : nullIdentifier()
+    , emptyIdentifier(Identifier::EmptyIdentifier)
+    , underscoreProto(vm, "__proto__")
+    , thisIdentifier(vm, "this")
+    , useStrictIdentifier(vm, "use strict")
+    JSC_COMMON_IDENTIFIERS_EACH_KEYWORD(INITIALIZE_KEYWORD)
     JSC_COMMON_IDENTIFIERS_EACH_PROPERTY_NAME(INITIALIZE_PROPERTY_NAME)
 {
 }