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

Side by Side Diff: src/factory.cc

Issue 255003002: Make CreateInitialObjects more concise. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comment Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « src/factory.h ('k') | src/heap.h » ('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 "factory.h" 5 #include "factory.h"
6 6
7 #include "conversions.h" 7 #include "conversions.h"
8 #include "isolate-inl.h" 8 #include "isolate-inl.h"
9 #include "macro-assembler.h" 9 #include "macro-assembler.h"
10 10
(...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after
1079 1079
1080 1080
1081 Handle<HeapNumber> Factory::NewHeapNumber(double value, 1081 Handle<HeapNumber> Factory::NewHeapNumber(double value,
1082 PretenureFlag pretenure) { 1082 PretenureFlag pretenure) {
1083 CALL_HEAP_FUNCTION( 1083 CALL_HEAP_FUNCTION(
1084 isolate(), 1084 isolate(),
1085 isolate()->heap()->AllocateHeapNumber(value, pretenure), HeapNumber); 1085 isolate()->heap()->AllocateHeapNumber(value, pretenure), HeapNumber);
1086 } 1086 }
1087 1087
1088 1088
1089 Handle<JSObject> Factory::NewNeanderObject() {
1090 CALL_HEAP_FUNCTION(
1091 isolate(),
1092 isolate()->heap()->AllocateJSObjectFromMap(
1093 isolate()->heap()->neander_map()),
1094 JSObject);
1095 }
1096
1097
1098 Handle<Object> Factory::NewTypeError(const char* message, 1089 Handle<Object> Factory::NewTypeError(const char* message,
1099 Vector< Handle<Object> > args) { 1090 Vector< Handle<Object> > args) {
1100 return NewError("MakeTypeError", message, args); 1091 return NewError("MakeTypeError", message, args);
1101 } 1092 }
1102 1093
1103 1094
1104 Handle<Object> Factory::NewTypeError(Handle<String> message) { 1095 Handle<Object> Factory::NewTypeError(Handle<String> message) {
1105 return NewError("$TypeError", message); 1096 return NewError("$TypeError", message);
1106 } 1097 }
1107 1098
(...skipping 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after
2312 return Handle<Object>::null(); 2303 return Handle<Object>::null();
2313 } 2304 }
2314 2305
2315 2306
2316 Handle<Object> Factory::ToBoolean(bool value) { 2307 Handle<Object> Factory::ToBoolean(bool value) {
2317 return value ? true_value() : false_value(); 2308 return value ? true_value() : false_value();
2318 } 2309 }
2319 2310
2320 2311
2321 } } // namespace v8::internal 2312 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/factory.h ('k') | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698