Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Side by Side Diff: src/factory.cc

Issue 1272763005: [stubs] Store typeof string on Oddballs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/factory.h ('k') | src/heap/heap.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_registry_slot(PrototypeInfo::UNREGISTERED); 58 result->set_registry_slot(PrototypeInfo::UNREGISTERED);
59 result->set_validity_cell(Smi::FromInt(0)); 59 result->set_validity_cell(Smi::FromInt(0));
60 result->set_constructor_name(Smi::FromInt(0)); 60 result->set_constructor_name(Smi::FromInt(0));
61 return result; 61 return result;
62 } 62 }
63 63
64 64
65 Handle<Oddball> Factory::NewOddball(Handle<Map> map, 65 Handle<Oddball> Factory::NewOddball(Handle<Map> map, const char* to_string,
66 const char* to_string,
67 Handle<Object> to_number, 66 Handle<Object> to_number,
68 byte kind) { 67 const char* type_of, byte kind) {
69 Handle<Oddball> oddball = New<Oddball>(map, OLD_SPACE); 68 Handle<Oddball> oddball = New<Oddball>(map, OLD_SPACE);
70 Oddball::Initialize(isolate(), oddball, to_string, to_number, kind); 69 Oddball::Initialize(isolate(), oddball, to_string, to_number, type_of, kind);
71 return oddball; 70 return oddball;
72 } 71 }
73 72
74 73
75 Handle<FixedArray> Factory::NewFixedArray(int size, PretenureFlag pretenure) { 74 Handle<FixedArray> Factory::NewFixedArray(int size, PretenureFlag pretenure) {
76 DCHECK(0 <= size); 75 DCHECK(0 <= size);
77 CALL_HEAP_FUNCTION( 76 CALL_HEAP_FUNCTION(
78 isolate(), 77 isolate(),
79 isolate()->heap()->AllocateFixedArray(size, pretenure), 78 isolate()->heap()->AllocateFixedArray(size, pretenure),
80 FixedArray); 79 FixedArray);
(...skipping 2392 matching lines...) Expand 10 before | Expand all | Expand 10 after
2473 } 2472 }
2474 2473
2475 2474
2476 Handle<Object> Factory::ToBoolean(bool value) { 2475 Handle<Object> Factory::ToBoolean(bool value) {
2477 return value ? true_value() : false_value(); 2476 return value ? true_value() : false_value();
2478 } 2477 }
2479 2478
2480 2479
2481 } // namespace internal 2480 } // namespace internal
2482 } // namespace v8 2481 } // namespace v8
OLDNEW
« no previous file with comments | « src/factory.h ('k') | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698