| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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_BUILTINS_H_ | 5 #ifndef V8_BUILTINS_H_ |
| 6 #define V8_BUILTINS_H_ | 6 #define V8_BUILTINS_H_ |
| 7 | 7 |
| 8 namespace v8 { | 8 namespace v8 { |
| 9 namespace internal { | 9 namespace internal { |
| 10 | 10 |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 Address builtin_address(Name name) { | 300 Address builtin_address(Name name) { |
| 301 return reinterpret_cast<Address>(&builtins_[name]); | 301 return reinterpret_cast<Address>(&builtins_[name]); |
| 302 } | 302 } |
| 303 | 303 |
| 304 static Address c_function_address(CFunctionId id) { | 304 static Address c_function_address(CFunctionId id) { |
| 305 return c_functions_[id]; | 305 return c_functions_[id]; |
| 306 } | 306 } |
| 307 | 307 |
| 308 static const char* GetName(JavaScript id) { return javascript_names_[id]; } | 308 static const char* GetName(JavaScript id) { return javascript_names_[id]; } |
| 309 const char* name(int index) { | 309 const char* name(int index) { |
| 310 ASSERT(index >= 0); | 310 DCHECK(index >= 0); |
| 311 ASSERT(index < builtin_count); | 311 DCHECK(index < builtin_count); |
| 312 return names_[index]; | 312 return names_[index]; |
| 313 } | 313 } |
| 314 static int GetArgumentsCount(JavaScript id) { return javascript_argc_[id]; } | 314 static int GetArgumentsCount(JavaScript id) { return javascript_argc_[id]; } |
| 315 Handle<Code> GetCode(JavaScript id, bool* resolved); | 315 Handle<Code> GetCode(JavaScript id, bool* resolved); |
| 316 static int NumberOfJavaScriptBuiltins() { return id_count; } | 316 static int NumberOfJavaScriptBuiltins() { return id_count; } |
| 317 | 317 |
| 318 bool is_initialized() const { return initialized_; } | 318 bool is_initialized() const { return initialized_; } |
| 319 | 319 |
| 320 private: | 320 private: |
| 321 Builtins(); | 321 Builtins(); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 | 378 |
| 379 friend class BuiltinFunctionTable; | 379 friend class BuiltinFunctionTable; |
| 380 friend class Isolate; | 380 friend class Isolate; |
| 381 | 381 |
| 382 DISALLOW_COPY_AND_ASSIGN(Builtins); | 382 DISALLOW_COPY_AND_ASSIGN(Builtins); |
| 383 }; | 383 }; |
| 384 | 384 |
| 385 } } // namespace v8::internal | 385 } } // namespace v8::internal |
| 386 | 386 |
| 387 #endif // V8_BUILTINS_H_ | 387 #endif // V8_BUILTINS_H_ |
| OLD | NEW |