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/objects-inl.h

Issue 2493823003: [wasm] Allocate a single script per wasm module (Closed)
Patch Set: Fix signed/unsigned issues 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
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 5897 matching lines...) Expand 10 before | Expand all | Expand 10 after
5908 SMI_ACCESSORS(Script, type, kTypeOffset) 5908 SMI_ACCESSORS(Script, type, kTypeOffset)
5909 ACCESSORS(Script, line_ends, Object, kLineEndsOffset) 5909 ACCESSORS(Script, line_ends, Object, kLineEndsOffset)
5910 ACCESSORS_CHECKED(Script, eval_from_shared, Object, kEvalFromSharedOffset, 5910 ACCESSORS_CHECKED(Script, eval_from_shared, Object, kEvalFromSharedOffset,
5911 this->type() != TYPE_WASM) 5911 this->type() != TYPE_WASM)
5912 SMI_ACCESSORS_CHECKED(Script, eval_from_position, kEvalFromPositionOffset, 5912 SMI_ACCESSORS_CHECKED(Script, eval_from_position, kEvalFromPositionOffset,
5913 this->type() != TYPE_WASM) 5913 this->type() != TYPE_WASM)
5914 ACCESSORS(Script, shared_function_infos, Object, kSharedFunctionInfosOffset) 5914 ACCESSORS(Script, shared_function_infos, Object, kSharedFunctionInfosOffset)
5915 SMI_ACCESSORS(Script, flags, kFlagsOffset) 5915 SMI_ACCESSORS(Script, flags, kFlagsOffset)
5916 ACCESSORS(Script, source_url, Object, kSourceUrlOffset) 5916 ACCESSORS(Script, source_url, Object, kSourceUrlOffset)
5917 ACCESSORS(Script, source_mapping_url, Object, kSourceMappingUrlOffset) 5917 ACCESSORS(Script, source_mapping_url, Object, kSourceMappingUrlOffset)
5918 ACCESSORS_CHECKED(Script, wasm_instance, JSObject, kEvalFromSharedOffset, 5918 ACCESSORS_CHECKED(Script, wasm_compiled_module, Object, kEvalFromSharedOffset,
5919 this->type() == TYPE_WASM) 5919 this->type() == TYPE_WASM)
5920 SMI_ACCESSORS_CHECKED(Script, wasm_function_index, kEvalFromPositionOffset,
5921 this->type() == TYPE_WASM)
5922 5920
5923 Script::CompilationType Script::compilation_type() { 5921 Script::CompilationType Script::compilation_type() {
5924 return BooleanBit::get(flags(), kCompilationTypeBit) ? 5922 return BooleanBit::get(flags(), kCompilationTypeBit) ?
5925 COMPILATION_TYPE_EVAL : COMPILATION_TYPE_HOST; 5923 COMPILATION_TYPE_EVAL : COMPILATION_TYPE_HOST;
5926 } 5924 }
5927 void Script::set_compilation_type(CompilationType type) { 5925 void Script::set_compilation_type(CompilationType type) {
5928 set_flags(BooleanBit::set(flags(), kCompilationTypeBit, 5926 set_flags(BooleanBit::set(flags(), kCompilationTypeBit,
5929 type == COMPILATION_TYPE_EVAL)); 5927 type == COMPILATION_TYPE_EVAL));
5930 } 5928 }
5931 bool Script::hide_source() { return BooleanBit::get(flags(), kHideSourceBit); } 5929 bool Script::hide_source() { return BooleanBit::get(flags(), kHideSourceBit); }
(...skipping 2488 matching lines...) Expand 10 before | Expand all | Expand 10 after
8420 #undef WRITE_INT64_FIELD 8418 #undef WRITE_INT64_FIELD
8421 #undef READ_BYTE_FIELD 8419 #undef READ_BYTE_FIELD
8422 #undef WRITE_BYTE_FIELD 8420 #undef WRITE_BYTE_FIELD
8423 #undef NOBARRIER_READ_BYTE_FIELD 8421 #undef NOBARRIER_READ_BYTE_FIELD
8424 #undef NOBARRIER_WRITE_BYTE_FIELD 8422 #undef NOBARRIER_WRITE_BYTE_FIELD
8425 8423
8426 } // namespace internal 8424 } // namespace internal
8427 } // namespace v8 8425 } // namespace v8
8428 8426
8429 #endif // V8_OBJECTS_INL_H_ 8427 #endif // V8_OBJECTS_INL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698