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

Side by Side Diff: src/objects-inl.h

Issue 2493823003: [wasm] Allocate a single script per wasm module (Closed)
Patch Set: rebase Created 4 years, 1 month 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/objects.cc ('k') | src/runtime/runtime.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 // Review notes: 5 // Review notes:
6 // 6 //
7 // - The use of macros in these inline functions may seem superfluous 7 // - The use of macros in these inline functions may seem superfluous
8 // but it is absolutely needed to make sure gcc generates optimal 8 // but it is absolutely needed to make sure gcc generates optimal
9 // code. gcc is not happy when attempting to inline too deep. 9 // code. gcc is not happy when attempting to inline too deep.
10 // 10 //
(...skipping 5917 matching lines...) Expand 10 before | Expand all | Expand 10 after
5928 SMI_ACCESSORS(Script, type, kTypeOffset) 5928 SMI_ACCESSORS(Script, type, kTypeOffset)
5929 ACCESSORS(Script, line_ends, Object, kLineEndsOffset) 5929 ACCESSORS(Script, line_ends, Object, kLineEndsOffset)
5930 ACCESSORS_CHECKED(Script, eval_from_shared, Object, kEvalFromSharedOffset, 5930 ACCESSORS_CHECKED(Script, eval_from_shared, Object, kEvalFromSharedOffset,
5931 this->type() != TYPE_WASM) 5931 this->type() != TYPE_WASM)
5932 SMI_ACCESSORS_CHECKED(Script, eval_from_position, kEvalFromPositionOffset, 5932 SMI_ACCESSORS_CHECKED(Script, eval_from_position, kEvalFromPositionOffset,
5933 this->type() != TYPE_WASM) 5933 this->type() != TYPE_WASM)
5934 ACCESSORS(Script, shared_function_infos, Object, kSharedFunctionInfosOffset) 5934 ACCESSORS(Script, shared_function_infos, Object, kSharedFunctionInfosOffset)
5935 SMI_ACCESSORS(Script, flags, kFlagsOffset) 5935 SMI_ACCESSORS(Script, flags, kFlagsOffset)
5936 ACCESSORS(Script, source_url, Object, kSourceUrlOffset) 5936 ACCESSORS(Script, source_url, Object, kSourceUrlOffset)
5937 ACCESSORS(Script, source_mapping_url, Object, kSourceMappingUrlOffset) 5937 ACCESSORS(Script, source_mapping_url, Object, kSourceMappingUrlOffset)
5938 ACCESSORS_CHECKED(Script, wasm_instance, JSObject, kEvalFromSharedOffset, 5938 ACCESSORS_CHECKED(Script, wasm_compiled_module, Object, kEvalFromSharedOffset,
5939 this->type() == TYPE_WASM) 5939 this->type() == TYPE_WASM)
5940 SMI_ACCESSORS_CHECKED(Script, wasm_function_index, kEvalFromPositionOffset,
5941 this->type() == TYPE_WASM)
5942 5940
5943 Script::CompilationType Script::compilation_type() { 5941 Script::CompilationType Script::compilation_type() {
5944 return BooleanBit::get(flags(), kCompilationTypeBit) ? 5942 return BooleanBit::get(flags(), kCompilationTypeBit) ?
5945 COMPILATION_TYPE_EVAL : COMPILATION_TYPE_HOST; 5943 COMPILATION_TYPE_EVAL : COMPILATION_TYPE_HOST;
5946 } 5944 }
5947 void Script::set_compilation_type(CompilationType type) { 5945 void Script::set_compilation_type(CompilationType type) {
5948 set_flags(BooleanBit::set(flags(), kCompilationTypeBit, 5946 set_flags(BooleanBit::set(flags(), kCompilationTypeBit,
5949 type == COMPILATION_TYPE_EVAL)); 5947 type == COMPILATION_TYPE_EVAL));
5950 } 5948 }
5951 bool Script::hide_source() { return BooleanBit::get(flags(), kHideSourceBit); } 5949 bool Script::hide_source() { return BooleanBit::get(flags(), kHideSourceBit); }
(...skipping 2488 matching lines...) Expand 10 before | Expand all | Expand 10 after
8440 #undef WRITE_INT64_FIELD 8438 #undef WRITE_INT64_FIELD
8441 #undef READ_BYTE_FIELD 8439 #undef READ_BYTE_FIELD
8442 #undef WRITE_BYTE_FIELD 8440 #undef WRITE_BYTE_FIELD
8443 #undef NOBARRIER_READ_BYTE_FIELD 8441 #undef NOBARRIER_READ_BYTE_FIELD
8444 #undef NOBARRIER_WRITE_BYTE_FIELD 8442 #undef NOBARRIER_WRITE_BYTE_FIELD
8445 8443
8446 } // namespace internal 8444 } // namespace internal
8447 } // namespace v8 8445 } // namespace v8
8448 8446
8449 #endif // V8_OBJECTS_INL_H_ 8447 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698