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

Side by Side Diff: src/objects.h

Issue 1316943002: Move (uppercase) JS builtins from js builtins object to native context. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: remove Isolate::js_builtins_object Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « src/mips64/macro-assembler-mips64.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 7133 matching lines...) Expand 10 before | Expand all | Expand 10 after
7144 7144
7145 private: 7145 private:
7146 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGlobalObject); 7146 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGlobalObject);
7147 }; 7147 };
7148 7148
7149 7149
7150 // Builtins global object which holds the runtime routines written in 7150 // Builtins global object which holds the runtime routines written in
7151 // JavaScript. 7151 // JavaScript.
7152 class JSBuiltinsObject: public GlobalObject { 7152 class JSBuiltinsObject: public GlobalObject {
7153 public: 7153 public:
7154 // Accessors for the runtime routines written in JavaScript.
7155 inline Object* javascript_builtin(Builtins::JavaScript id);
7156 inline void set_javascript_builtin(Builtins::JavaScript id, Object* value);
7157
7158 DECLARE_CAST(JSBuiltinsObject) 7154 DECLARE_CAST(JSBuiltinsObject)
7159 7155
7160 // Dispatched behavior. 7156 // Dispatched behavior.
7161 DECLARE_PRINTER(JSBuiltinsObject) 7157 DECLARE_PRINTER(JSBuiltinsObject)
7162 DECLARE_VERIFIER(JSBuiltinsObject) 7158 DECLARE_VERIFIER(JSBuiltinsObject)
7163 7159
7164 // Layout description. The size of the builtins object includes 7160 // Layout description.
7165 // room for two pointers per runtime routine written in javascript 7161 static const int kSize = GlobalObject::kHeaderSize;
7166 // (function and code object).
7167 static const int kJSBuiltinsCount = Builtins::id_count;
7168 static const int kJSBuiltinsOffset = GlobalObject::kHeaderSize;
7169 static const int kSize =
7170 GlobalObject::kHeaderSize + (kJSBuiltinsCount * kPointerSize);
7171
7172 static int OffsetOfFunctionWithId(Builtins::JavaScript id) {
7173 return kJSBuiltinsOffset + id * kPointerSize;
7174 }
7175 7162
7176 private: 7163 private:
7177 DISALLOW_IMPLICIT_CONSTRUCTORS(JSBuiltinsObject); 7164 DISALLOW_IMPLICIT_CONSTRUCTORS(JSBuiltinsObject);
7178 }; 7165 };
7179 7166
7180 7167
7181 // Representation for JS Wrapper objects, String, Number, Boolean, etc. 7168 // Representation for JS Wrapper objects, String, Number, Boolean, etc.
7182 class JSValue: public JSObject { 7169 class JSValue: public JSObject {
7183 public: 7170 public:
7184 // [value]: the object being wrapped. 7171 // [value]: the object being wrapped.
(...skipping 3150 matching lines...) Expand 10 before | Expand all | Expand 10 after
10335 } else { 10322 } else {
10336 value &= ~(1 << bit_position); 10323 value &= ~(1 << bit_position);
10337 } 10324 }
10338 return value; 10325 return value;
10339 } 10326 }
10340 }; 10327 };
10341 10328
10342 } } // namespace v8::internal 10329 } } // namespace v8::internal
10343 10330
10344 #endif // V8_OBJECTS_H_ 10331 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/mips64/macro-assembler-mips64.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698