Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 287 Code* builtin(Name name) { | 287 Code* builtin(Name name) { |
| 288 // Code::cast cannot be used here since we access builtins | 288 // Code::cast cannot be used here since we access builtins |
| 289 // during the marking phase of mark sweep. See IC::Clear. | 289 // during the marking phase of mark sweep. See IC::Clear. |
| 290 return reinterpret_cast<Code*>(builtins_[name]); | 290 return reinterpret_cast<Code*>(builtins_[name]); |
| 291 } | 291 } |
| 292 | 292 |
| 293 Address builtin_address(Name name) { | 293 Address builtin_address(Name name) { |
| 294 return reinterpret_cast<Address>(&builtins_[name]); | 294 return reinterpret_cast<Address>(&builtins_[name]); |
| 295 } | 295 } |
| 296 | 296 |
| 297 static Handle<Code> builtin(Name name, Isolate* isolate); | |
|
Vitaly Repeshko
2011/03/22 14:46:20
Why you don't want to make this an instance method
| |
| 298 | |
| 297 static Address c_function_address(CFunctionId id) { | 299 static Address c_function_address(CFunctionId id) { |
| 298 return c_functions_[id]; | 300 return c_functions_[id]; |
| 299 } | 301 } |
| 300 | 302 |
| 301 static const char* GetName(JavaScript id) { return javascript_names_[id]; } | 303 static const char* GetName(JavaScript id) { return javascript_names_[id]; } |
| 302 static int GetArgumentsCount(JavaScript id) { return javascript_argc_[id]; } | 304 static int GetArgumentsCount(JavaScript id) { return javascript_argc_[id]; } |
| 303 Handle<Code> GetCode(JavaScript id, bool* resolved); | 305 Handle<Code> GetCode(JavaScript id, bool* resolved); |
| 304 static int NumberOfJavaScriptBuiltins() { return id_count; } | 306 static int NumberOfJavaScriptBuiltins() { return id_count; } |
| 305 | 307 |
| 306 bool is_initialized() const { return initialized_; } | 308 bool is_initialized() const { return initialized_; } |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 350 | 352 |
| 351 friend class BuiltinFunctionTable; | 353 friend class BuiltinFunctionTable; |
| 352 friend class Isolate; | 354 friend class Isolate; |
| 353 | 355 |
| 354 DISALLOW_COPY_AND_ASSIGN(Builtins); | 356 DISALLOW_COPY_AND_ASSIGN(Builtins); |
| 355 }; | 357 }; |
| 356 | 358 |
| 357 } } // namespace v8::internal | 359 } } // namespace v8::internal |
| 358 | 360 |
| 359 #endif // V8_BUILTINS_H_ | 361 #endif // V8_BUILTINS_H_ |
| OLD | NEW |