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

Side by Side Diff: src/factory.cc

Issue 2151163002: [stubs] Improve code generation for ToBoolean. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Fix redness. Created 4 years, 5 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/accessors.h" 7 #include "src/accessors.h"
8 #include "src/allocation-site-scopes.h" 8 #include "src/allocation-site-scopes.h"
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 DCHECK(scope_info->is_declaration_scope()); 108 DCHECK(scope_info->is_declaration_scope());
109 Handle<SloppyBlockWithEvalContextExtension> result = 109 Handle<SloppyBlockWithEvalContextExtension> result =
110 Handle<SloppyBlockWithEvalContextExtension>::cast( 110 Handle<SloppyBlockWithEvalContextExtension>::cast(
111 NewStruct(SLOPPY_BLOCK_WITH_EVAL_CONTEXT_EXTENSION_TYPE)); 111 NewStruct(SLOPPY_BLOCK_WITH_EVAL_CONTEXT_EXTENSION_TYPE));
112 result->set_scope_info(*scope_info); 112 result->set_scope_info(*scope_info);
113 result->set_extension(*extension); 113 result->set_extension(*extension);
114 return result; 114 return result;
115 } 115 }
116 116
117 Handle<Oddball> Factory::NewOddball(Handle<Map> map, const char* to_string, 117 Handle<Oddball> Factory::NewOddball(Handle<Map> map, const char* to_string,
118 Handle<Object> to_number, bool to_boolean, 118 Handle<Object> to_number,
119 const char* type_of, byte kind) { 119 const char* type_of, byte kind) {
120 Handle<Oddball> oddball = New<Oddball>(map, OLD_SPACE); 120 Handle<Oddball> oddball = New<Oddball>(map, OLD_SPACE);
121 Oddball::Initialize(isolate(), oddball, to_string, to_number, to_boolean, 121 Oddball::Initialize(isolate(), oddball, to_string, to_number, type_of, kind);
122 type_of, kind);
123 return oddball; 122 return oddball;
124 } 123 }
125 124
126 125
127 Handle<FixedArray> Factory::NewFixedArray(int size, PretenureFlag pretenure) { 126 Handle<FixedArray> Factory::NewFixedArray(int size, PretenureFlag pretenure) {
128 DCHECK(0 <= size); 127 DCHECK(0 <= size);
129 CALL_HEAP_FUNCTION( 128 CALL_HEAP_FUNCTION(
130 isolate(), 129 isolate(),
131 isolate()->heap()->AllocateFixedArray(size, pretenure), 130 isolate()->heap()->AllocateFixedArray(size, pretenure),
132 FixedArray); 131 FixedArray);
(...skipping 2374 matching lines...) Expand 10 before | Expand all | Expand 10 after
2507 Handle<AccessorInfo> prototype = 2506 Handle<AccessorInfo> prototype =
2508 Accessors::FunctionPrototypeInfo(isolate(), attribs); 2507 Accessors::FunctionPrototypeInfo(isolate(), attribs);
2509 AccessorConstantDescriptor d(Handle<Name>(Name::cast(prototype->name())), 2508 AccessorConstantDescriptor d(Handle<Name>(Name::cast(prototype->name())),
2510 prototype, attribs); 2509 prototype, attribs);
2511 map->AppendDescriptor(&d); 2510 map->AppendDescriptor(&d);
2512 } 2511 }
2513 } 2512 }
2514 2513
2515 } // namespace internal 2514 } // namespace internal
2516 } // namespace v8 2515 } // 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