| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 23 matching lines...) Expand all Loading... |
| 34 #include "macro-assembler.h" | 34 #include "macro-assembler.h" |
| 35 #include "objects.h" | 35 #include "objects.h" |
| 36 #include "objects-visiting.h" | 36 #include "objects-visiting.h" |
| 37 #include "platform.h" | 37 #include "platform.h" |
| 38 #include "scopeinfo.h" | 38 #include "scopeinfo.h" |
| 39 | 39 |
| 40 namespace v8 { | 40 namespace v8 { |
| 41 namespace internal { | 41 namespace internal { |
| 42 | 42 |
| 43 | 43 |
| 44 Handle<Box> Factory::NewBox(Handle<Object> value, PretenureFlag pretenure) { |
| 45 CALL_HEAP_FUNCTION( |
| 46 isolate(), |
| 47 isolate()->heap()->AllocateBox(*value, pretenure), |
| 48 Box); |
| 49 } |
| 50 |
| 51 |
| 44 Handle<FixedArray> Factory::NewFixedArray(int size, PretenureFlag pretenure) { | 52 Handle<FixedArray> Factory::NewFixedArray(int size, PretenureFlag pretenure) { |
| 45 ASSERT(0 <= size); | 53 ASSERT(0 <= size); |
| 46 CALL_HEAP_FUNCTION( | 54 CALL_HEAP_FUNCTION( |
| 47 isolate(), | 55 isolate(), |
| 48 isolate()->heap()->AllocateFixedArray(size, pretenure), | 56 isolate()->heap()->AllocateFixedArray(size, pretenure), |
| 49 FixedArray); | 57 FixedArray); |
| 50 } | 58 } |
| 51 | 59 |
| 52 | 60 |
| 53 Handle<FixedArray> Factory::NewFixedArrayWithHoles(int size, | 61 Handle<FixedArray> Factory::NewFixedArrayWithHoles(int size, |
| (...skipping 1502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1556 return Handle<Object>::null(); | 1564 return Handle<Object>::null(); |
| 1557 } | 1565 } |
| 1558 | 1566 |
| 1559 | 1567 |
| 1560 Handle<Object> Factory::ToBoolean(bool value) { | 1568 Handle<Object> Factory::ToBoolean(bool value) { |
| 1561 return value ? true_value() : false_value(); | 1569 return value ? true_value() : false_value(); |
| 1562 } | 1570 } |
| 1563 | 1571 |
| 1564 | 1572 |
| 1565 } } // namespace v8::internal | 1573 } } // namespace v8::internal |
| OLD | NEW |