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 return Handle<DeclaredAccessorDescriptor>::cast( |
| 368 NewStruct(DECLARED_ACCESSOR_DESCRIPTOR_TYPE)); |
| 369 } |
| 370 |
| 371 |
366 Handle<DeclaredAccessorInfo> Factory::NewDeclaredAccessorInfo() { | 372 Handle<DeclaredAccessorInfo> Factory::NewDeclaredAccessorInfo() { |
367 Handle<DeclaredAccessorInfo> info = | 373 Handle<DeclaredAccessorInfo> info = |
368 Handle<DeclaredAccessorInfo>::cast( | 374 Handle<DeclaredAccessorInfo>::cast( |
369 NewStruct(DECLARED_ACCESSOR_INFO_TYPE)); | 375 NewStruct(DECLARED_ACCESSOR_INFO_TYPE)); |
370 info->set_flag(0); // Must clear the flag, it was initialized as undefined. | 376 info->set_flag(0); // Must clear the flag, it was initialized as undefined. |
371 return info; | 377 return info; |
372 } | 378 } |
373 | 379 |
374 | 380 |
375 Handle<ExecutableAccessorInfo> Factory::NewExecutableAccessorInfo() { | 381 Handle<ExecutableAccessorInfo> Factory::NewExecutableAccessorInfo() { |
(...skipping 1081 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1457 | 1463 |
1458 | 1464 |
1459 Handle<Object> Factory::ToBoolean(bool value) { | 1465 Handle<Object> Factory::ToBoolean(bool value) { |
1460 return Handle<Object>(value | 1466 return Handle<Object>(value |
1461 ? isolate()->heap()->true_value() | 1467 ? isolate()->heap()->true_value() |
1462 : isolate()->heap()->false_value()); | 1468 : isolate()->heap()->false_value()); |
1463 } | 1469 } |
1464 | 1470 |
1465 | 1471 |
1466 } } // namespace v8::internal | 1472 } } // namespace v8::internal |
OLD | NEW |