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

Side by Side Diff: src/runtime/runtime-internal.cc

Issue 2555703003: [stubs] Add option to allow LO space allocation (Closed)
Patch Set: Address comments Created 4 years 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/code-stub-assembler.cc ('k') | test/mjsunit/regress/regress-670671.js » ('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/runtime/runtime-utils.h" 5 #include "src/runtime/runtime-utils.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "src/arguments.h" 9 #include "src/arguments.h"
10 #include "src/ast/prettyprinter.h" 10 #include "src/ast/prettyprinter.h"
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 } 266 }
267 267
268 268
269 RUNTIME_FUNCTION(Runtime_AllocateInTargetSpace) { 269 RUNTIME_FUNCTION(Runtime_AllocateInTargetSpace) {
270 HandleScope scope(isolate); 270 HandleScope scope(isolate);
271 DCHECK(args.length() == 2); 271 DCHECK(args.length() == 2);
272 CONVERT_SMI_ARG_CHECKED(size, 0); 272 CONVERT_SMI_ARG_CHECKED(size, 0);
273 CONVERT_SMI_ARG_CHECKED(flags, 1); 273 CONVERT_SMI_ARG_CHECKED(flags, 1);
274 CHECK(IsAligned(size, kPointerSize)); 274 CHECK(IsAligned(size, kPointerSize));
275 CHECK(size > 0); 275 CHECK(size > 0);
276 CHECK(size <= kMaxRegularHeapObjectSize);
277 bool double_align = AllocateDoubleAlignFlag::decode(flags); 276 bool double_align = AllocateDoubleAlignFlag::decode(flags);
278 AllocationSpace space = AllocateTargetSpace::decode(flags); 277 AllocationSpace space = AllocateTargetSpace::decode(flags);
278 CHECK(size <= kMaxRegularHeapObjectSize || space == LO_SPACE);
279 return *isolate->factory()->NewFillerObject(size, double_align, space); 279 return *isolate->factory()->NewFillerObject(size, double_align, space);
280 } 280 }
281 281
282 RUNTIME_FUNCTION(Runtime_AllocateSeqOneByteString) { 282 RUNTIME_FUNCTION(Runtime_AllocateSeqOneByteString) {
283 HandleScope scope(isolate); 283 HandleScope scope(isolate);
284 DCHECK_EQ(1, args.length()); 284 DCHECK_EQ(1, args.length());
285 CONVERT_SMI_ARG_CHECKED(length, 0); 285 CONVERT_SMI_ARG_CHECKED(length, 0);
286 Handle<SeqOneByteString> result; 286 Handle<SeqOneByteString> result;
287 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( 287 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
288 isolate, result, isolate->factory()->NewRawOneByteString(length)); 288 isolate, result, isolate->factory()->NewRawOneByteString(length));
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 472
473 RUNTIME_FUNCTION(Runtime_Typeof) { 473 RUNTIME_FUNCTION(Runtime_Typeof) {
474 HandleScope scope(isolate); 474 HandleScope scope(isolate);
475 DCHECK_EQ(1, args.length()); 475 DCHECK_EQ(1, args.length());
476 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); 476 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
477 return *Object::TypeOf(isolate, object); 477 return *Object::TypeOf(isolate, object);
478 } 478 }
479 479
480 } // namespace internal 480 } // namespace internal
481 } // namespace v8 481 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stub-assembler.cc ('k') | test/mjsunit/regress/regress-670671.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698