Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 356 | 356 |
| 357 | 357 |
| 358 Handle<Struct> Factory::NewStruct(InstanceType type) { | 358 Handle<Struct> Factory::NewStruct(InstanceType type) { |
| 359 CALL_HEAP_FUNCTION( | 359 CALL_HEAP_FUNCTION( |
| 360 isolate(), | 360 isolate(), |
| 361 isolate()->heap()->AllocateStruct(type), | 361 isolate()->heap()->AllocateStruct(type), |
| 362 Struct); | 362 Struct); |
| 363 } | 363 } |
| 364 | 364 |
| 365 | 365 |
| 366 Handle<DeclaredAccessorDescriptor> Factory::NewDeclaredAccessorDescriptor() { | |
| 367 Handle<DeclaredAccessorDescriptor> descriptor = | |
|
Sven Panne
2013/02/19 08:41:16
Naming this doesn't buy us anything, just "return"
| |
| 368 Handle<DeclaredAccessorDescriptor>::cast( | |
| 369 NewStruct(DECLARED_ACCESSOR_DESCRIPTOR_TYPE)); | |
| 370 return descriptor; | |
| 371 } | |
| 372 | |
| 373 | |
| 366 Handle<DeclaredAccessorInfo> Factory::NewDeclaredAccessorInfo() { | 374 Handle<DeclaredAccessorInfo> Factory::NewDeclaredAccessorInfo() { |
| 367 Handle<DeclaredAccessorInfo> info = | 375 Handle<DeclaredAccessorInfo> info = |
| 368 Handle<DeclaredAccessorInfo>::cast( | 376 Handle<DeclaredAccessorInfo>::cast( |
| 369 NewStruct(DECLARED_ACCESSOR_INFO_TYPE)); | 377 NewStruct(DECLARED_ACCESSOR_INFO_TYPE)); |
| 370 info->set_flag(0); // Must clear the flag, it was initialized as undefined. | 378 info->set_flag(0); // Must clear the flag, it was initialized as undefined. |
| 371 return info; | 379 return info; |
| 372 } | 380 } |
| 373 | 381 |
| 374 | 382 |
| 375 Handle<ExecutableAccessorInfo> Factory::NewExecutableAccessorInfo() { | 383 Handle<ExecutableAccessorInfo> Factory::NewExecutableAccessorInfo() { |
| (...skipping 1081 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1457 | 1465 |
| 1458 | 1466 |
| 1459 Handle<Object> Factory::ToBoolean(bool value) { | 1467 Handle<Object> Factory::ToBoolean(bool value) { |
| 1460 return Handle<Object>(value | 1468 return Handle<Object>(value |
| 1461 ? isolate()->heap()->true_value() | 1469 ? isolate()->heap()->true_value() |
| 1462 : isolate()->heap()->false_value()); | 1470 : isolate()->heap()->false_value()); |
| 1463 } | 1471 } |
| 1464 | 1472 |
| 1465 | 1473 |
| 1466 } } // namespace v8::internal | 1474 } } // namespace v8::internal |
| OLD | NEW |