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

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

Issue 2311203002: Move kMaxRegularHeapObjectSize into globals (Closed)
Patch Set: Saving the file helps... Created 4 years, 3 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/ppc/macro-assembler-ppc.cc ('k') | src/s390/code-stubs-s390.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/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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 return isolate->stack_guard()->HandleInterrupts(); 350 return isolate->stack_guard()->HandleInterrupts();
351 } 351 }
352 352
353 353
354 RUNTIME_FUNCTION(Runtime_AllocateInNewSpace) { 354 RUNTIME_FUNCTION(Runtime_AllocateInNewSpace) {
355 HandleScope scope(isolate); 355 HandleScope scope(isolate);
356 DCHECK(args.length() == 1); 356 DCHECK(args.length() == 1);
357 CONVERT_SMI_ARG_CHECKED(size, 0); 357 CONVERT_SMI_ARG_CHECKED(size, 0);
358 CHECK(IsAligned(size, kPointerSize)); 358 CHECK(IsAligned(size, kPointerSize));
359 CHECK(size > 0); 359 CHECK(size > 0);
360 CHECK(size <= Page::kMaxRegularHeapObjectSize); 360 CHECK(size <= kMaxRegularHeapObjectSize);
361 return *isolate->factory()->NewFillerObject(size, false, NEW_SPACE); 361 return *isolate->factory()->NewFillerObject(size, false, NEW_SPACE);
362 } 362 }
363 363
364 364
365 RUNTIME_FUNCTION(Runtime_AllocateInTargetSpace) { 365 RUNTIME_FUNCTION(Runtime_AllocateInTargetSpace) {
366 HandleScope scope(isolate); 366 HandleScope scope(isolate);
367 DCHECK(args.length() == 2); 367 DCHECK(args.length() == 2);
368 CONVERT_SMI_ARG_CHECKED(size, 0); 368 CONVERT_SMI_ARG_CHECKED(size, 0);
369 CONVERT_SMI_ARG_CHECKED(flags, 1); 369 CONVERT_SMI_ARG_CHECKED(flags, 1);
370 CHECK(IsAligned(size, kPointerSize)); 370 CHECK(IsAligned(size, kPointerSize));
371 CHECK(size > 0); 371 CHECK(size > 0);
372 CHECK(size <= Page::kMaxRegularHeapObjectSize); 372 CHECK(size <= kMaxRegularHeapObjectSize);
373 bool double_align = AllocateDoubleAlignFlag::decode(flags); 373 bool double_align = AllocateDoubleAlignFlag::decode(flags);
374 AllocationSpace space = AllocateTargetSpace::decode(flags); 374 AllocationSpace space = AllocateTargetSpace::decode(flags);
375 return *isolate->factory()->NewFillerObject(size, double_align, space); 375 return *isolate->factory()->NewFillerObject(size, double_align, space);
376 } 376 }
377 377
378 RUNTIME_FUNCTION(Runtime_AllocateSeqOneByteString) { 378 RUNTIME_FUNCTION(Runtime_AllocateSeqOneByteString) {
379 HandleScope scope(isolate); 379 HandleScope scope(isolate);
380 DCHECK_EQ(1, args.length()); 380 DCHECK_EQ(1, args.length());
381 CONVERT_SMI_ARG_CHECKED(length, 0); 381 CONVERT_SMI_ARG_CHECKED(length, 0);
382 Handle<SeqOneByteString> result; 382 Handle<SeqOneByteString> result;
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 590
591 RUNTIME_FUNCTION(Runtime_Typeof) { 591 RUNTIME_FUNCTION(Runtime_Typeof) {
592 HandleScope scope(isolate); 592 HandleScope scope(isolate);
593 DCHECK_EQ(1, args.length()); 593 DCHECK_EQ(1, args.length());
594 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); 594 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
595 return *Object::TypeOf(isolate, object); 595 return *Object::TypeOf(isolate, object);
596 } 596 }
597 597
598 } // namespace internal 598 } // namespace internal
599 } // namespace v8 599 } // namespace v8
OLDNEW
« no previous file with comments | « src/ppc/macro-assembler-ppc.cc ('k') | src/s390/code-stubs-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698