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

Side by Side Diff: src/objects.h

Issue 1219993002: Remove unused is_class_scope bit from Scope and ScopeInfo (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 | « no previous file | src/parser.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 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 #ifndef V8_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 4011 matching lines...) Expand 10 before | Expand all | Expand 10 after
4022 // slot index if the function name is present and context-allocated (named 4022 // slot index if the function name is present and context-allocated (named
4023 // function expressions, only), otherwise returns a value < 0. The name 4023 // function expressions, only), otherwise returns a value < 0. The name
4024 // must be an internalized string. 4024 // must be an internalized string.
4025 int FunctionContextSlotIndex(String* name, VariableMode* mode); 4025 int FunctionContextSlotIndex(String* name, VariableMode* mode);
4026 4026
4027 // Lookup support for serialized scope info. Returns the receiver context 4027 // Lookup support for serialized scope info. Returns the receiver context
4028 // slot index if scope has a "this" binding, and the binding is 4028 // slot index if scope has a "this" binding, and the binding is
4029 // context-allocated. Otherwise returns a value < 0. 4029 // context-allocated. Otherwise returns a value < 0.
4030 int ReceiverContextSlotIndex(); 4030 int ReceiverContextSlotIndex();
4031 4031
4032 bool block_scope_is_class_scope();
4033 FunctionKind function_kind(); 4032 FunctionKind function_kind();
4034 4033
4035 // Copies all the context locals into an object used to materialize a scope. 4034 // Copies all the context locals into an object used to materialize a scope.
4036 static void CopyContextLocalsToScopeObject(Handle<ScopeInfo> scope_info, 4035 static void CopyContextLocalsToScopeObject(Handle<ScopeInfo> scope_info,
4037 Handle<Context> context, 4036 Handle<Context> context,
4038 Handle<JSObject> scope_object); 4037 Handle<JSObject> scope_object);
4039 4038
4040 4039
4041 static Handle<ScopeInfo> Create(Isolate* isolate, Zone* zone, Scope* scope); 4040 static Handle<ScopeInfo> Create(Isolate* isolate, Zone* zone, Scope* scope);
4042 static Handle<ScopeInfo> CreateGlobalThisBinding(Isolate* isolate); 4041 static Handle<ScopeInfo> CreateGlobalThisBinding(Isolate* isolate);
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
4150 class FunctionVariableField 4149 class FunctionVariableField
4151 : public BitField<VariableAllocationInfo, ReceiverVariableField::kNext, 4150 : public BitField<VariableAllocationInfo, ReceiverVariableField::kNext,
4152 2> {}; 4151 2> {};
4153 class FunctionVariableMode 4152 class FunctionVariableMode
4154 : public BitField<VariableMode, FunctionVariableField::kNext, 3> {}; 4153 : public BitField<VariableMode, FunctionVariableField::kNext, 3> {};
4155 class AsmModuleField : public BitField<bool, FunctionVariableMode::kNext, 1> { 4154 class AsmModuleField : public BitField<bool, FunctionVariableMode::kNext, 1> {
4156 }; 4155 };
4157 class AsmFunctionField : public BitField<bool, AsmModuleField::kNext, 1> {}; 4156 class AsmFunctionField : public BitField<bool, AsmModuleField::kNext, 1> {};
4158 class IsSimpleParameterListField 4157 class IsSimpleParameterListField
4159 : public BitField<bool, AsmFunctionField::kNext, 1> {}; 4158 : public BitField<bool, AsmFunctionField::kNext, 1> {};
4160 class BlockScopeIsClassScopeField
4161 : public BitField<bool, IsSimpleParameterListField::kNext, 1> {};
4162 class FunctionKindField 4159 class FunctionKindField
4163 : public BitField<FunctionKind, BlockScopeIsClassScopeField::kNext, 8> {}; 4160 : public BitField<FunctionKind, IsSimpleParameterListField::kNext, 8> {};
4164 4161
4165 // BitFields representing the encoded information for context locals in the 4162 // BitFields representing the encoded information for context locals in the
4166 // ContextLocalInfoEntries part. 4163 // ContextLocalInfoEntries part.
4167 class ContextLocalMode: public BitField<VariableMode, 0, 3> {}; 4164 class ContextLocalMode: public BitField<VariableMode, 0, 3> {};
4168 class ContextLocalInitFlag: public BitField<InitializationFlag, 3, 1> {}; 4165 class ContextLocalInitFlag: public BitField<InitializationFlag, 3, 1> {};
4169 class ContextLocalMaybeAssignedFlag 4166 class ContextLocalMaybeAssignedFlag
4170 : public BitField<MaybeAssignedFlag, 4, 1> {}; 4167 : public BitField<MaybeAssignedFlag, 4, 1> {};
4171 }; 4168 };
4172 4169
4173 4170
(...skipping 6649 matching lines...) Expand 10 before | Expand all | Expand 10 after
10823 } else { 10820 } else {
10824 value &= ~(1 << bit_position); 10821 value &= ~(1 << bit_position);
10825 } 10822 }
10826 return value; 10823 return value;
10827 } 10824 }
10828 }; 10825 };
10829 10826
10830 } } // namespace v8::internal 10827 } } // namespace v8::internal
10831 10828
10832 #endif // V8_OBJECTS_H_ 10829 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « no previous file | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698