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

Side by Side Diff: src/factory.cc

Issue 1230753004: [Interpreter] Add BytecodeArray class and add to SharedFunctionInfo. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix pedantic build (take2). Created 5 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-snapshot-generator.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 855 matching lines...) Expand 10 before | Expand all | Expand 10 after
866 866
867 Handle<ByteArray> Factory::NewByteArray(int length, PretenureFlag pretenure) { 867 Handle<ByteArray> Factory::NewByteArray(int length, PretenureFlag pretenure) {
868 DCHECK(0 <= length); 868 DCHECK(0 <= length);
869 CALL_HEAP_FUNCTION( 869 CALL_HEAP_FUNCTION(
870 isolate(), 870 isolate(),
871 isolate()->heap()->AllocateByteArray(length, pretenure), 871 isolate()->heap()->AllocateByteArray(length, pretenure),
872 ByteArray); 872 ByteArray);
873 } 873 }
874 874
875 875
876 Handle<BytecodeArray> Factory::NewBytecodeArray(int length,
877 const byte* raw_bytecodes) {
878 DCHECK(0 <= length);
879 CALL_HEAP_FUNCTION(isolate(), isolate()->heap()->AllocateBytecodeArray(
880 length, raw_bytecodes),
881 BytecodeArray);
882 }
883
884
876 Handle<ExternalArray> Factory::NewExternalArray(int length, 885 Handle<ExternalArray> Factory::NewExternalArray(int length,
877 ExternalArrayType array_type, 886 ExternalArrayType array_type,
878 void* external_pointer, 887 void* external_pointer,
879 PretenureFlag pretenure) { 888 PretenureFlag pretenure) {
880 DCHECK(0 <= length && length <= Smi::kMaxValue); 889 DCHECK(0 <= length && length <= Smi::kMaxValue);
881 CALL_HEAP_FUNCTION( 890 CALL_HEAP_FUNCTION(
882 isolate(), 891 isolate(),
883 isolate()->heap()->AllocateExternalArray(length, 892 isolate()->heap()->AllocateExternalArray(length,
884 array_type, 893 array_type,
885 external_pointer, 894 external_pointer,
(...skipping 1533 matching lines...) Expand 10 before | Expand all | Expand 10 after
2419 } 2428 }
2420 2429
2421 2430
2422 Handle<Object> Factory::ToBoolean(bool value) { 2431 Handle<Object> Factory::ToBoolean(bool value) {
2423 return value ? true_value() : false_value(); 2432 return value ? true_value() : false_value();
2424 } 2433 }
2425 2434
2426 2435
2427 } // namespace internal 2436 } // namespace internal
2428 } // namespace v8 2437 } // namespace v8
OLDNEW
« no previous file with comments | « src/factory.h ('k') | src/heap-snapshot-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698