OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 #include "src/factory.h" | 5 #include "src/factory.h" |
6 | 6 |
7 #include "src/allocation-site-scopes.h" | 7 #include "src/allocation-site-scopes.h" |
8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/conversions.h" | 10 #include "src/conversions.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 result->set_value(*value); | 49 result->set_value(*value); |
50 return result; | 50 return result; |
51 } | 51 } |
52 | 52 |
53 | 53 |
54 Handle<PrototypeInfo> Factory::NewPrototypeInfo() { | 54 Handle<PrototypeInfo> Factory::NewPrototypeInfo() { |
55 Handle<PrototypeInfo> result = | 55 Handle<PrototypeInfo> result = |
56 Handle<PrototypeInfo>::cast(NewStruct(PROTOTYPE_INFO_TYPE)); | 56 Handle<PrototypeInfo>::cast(NewStruct(PROTOTYPE_INFO_TYPE)); |
57 result->set_prototype_users(WeakFixedArray::Empty()); | 57 result->set_prototype_users(WeakFixedArray::Empty()); |
58 result->set_validity_cell(Smi::FromInt(0)); | 58 result->set_validity_cell(Smi::FromInt(0)); |
| 59 result->set_constructor_name(Smi::FromInt(0)); |
59 return result; | 60 return result; |
60 } | 61 } |
61 | 62 |
62 | 63 |
63 Handle<Oddball> Factory::NewOddball(Handle<Map> map, | 64 Handle<Oddball> Factory::NewOddball(Handle<Map> map, |
64 const char* to_string, | 65 const char* to_string, |
65 Handle<Object> to_number, | 66 Handle<Object> to_number, |
66 byte kind) { | 67 byte kind) { |
67 Handle<Oddball> oddball = New<Oddball>(map, OLD_SPACE); | 68 Handle<Oddball> oddball = New<Oddball>(map, OLD_SPACE); |
68 Oddball::Initialize(isolate(), oddball, to_string, to_number, kind); | 69 Oddball::Initialize(isolate(), oddball, to_string, to_number, kind); |
(...skipping 2403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2472 return Handle<Object>::null(); | 2473 return Handle<Object>::null(); |
2473 } | 2474 } |
2474 | 2475 |
2475 | 2476 |
2476 Handle<Object> Factory::ToBoolean(bool value) { | 2477 Handle<Object> Factory::ToBoolean(bool value) { |
2477 return value ? true_value() : false_value(); | 2478 return value ? true_value() : false_value(); |
2478 } | 2479 } |
2479 | 2480 |
2480 | 2481 |
2481 } } // namespace v8::internal | 2482 } } // namespace v8::internal |
OLD | NEW |