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

Unified Diff: src/hydrogen-instructions.h

Issue 894683003: Introduce LanguageMode, drop StrictMode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebased (w/ conflicts) Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index b69ce7952dd917a918beb470806486b1637e4708..5e587ce20f72effe0bc2d468292c526a67e2fd2f 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -7057,12 +7057,12 @@ class HStoreNamedGeneric FINAL : public HTemplateInstruction<3> {
public:
DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P4(HStoreNamedGeneric, HValue*,
Handle<String>, HValue*,
- StrictMode);
+ LanguageMode);
HValue* object() const { return OperandAt(0); }
HValue* value() const { return OperandAt(1); }
HValue* context() const { return OperandAt(2); }
Handle<String> name() const { return name_; }
- StrictMode strict_mode() const { return strict_mode_; }
+ LanguageMode language_mode() const { return language_mode_; }
std::ostream& PrintDataTo(std::ostream& os) const OVERRIDE; // NOLINT
@@ -7073,13 +7073,9 @@ class HStoreNamedGeneric FINAL : public HTemplateInstruction<3> {
DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric)
private:
- HStoreNamedGeneric(HValue* context,
- HValue* object,
- Handle<String> name,
- HValue* value,
- StrictMode strict_mode)
- : name_(name),
- strict_mode_(strict_mode) {
+ HStoreNamedGeneric(HValue* context, HValue* object, Handle<String> name,
+ HValue* value, LanguageMode language_mode)
+ : name_(name), language_mode_(language_mode) {
SetOperandAt(0, object);
SetOperandAt(1, value);
SetOperandAt(2, context);
@@ -7087,7 +7083,7 @@ class HStoreNamedGeneric FINAL : public HTemplateInstruction<3> {
}
Handle<String> name_;
- StrictMode strict_mode_;
+ LanguageMode language_mode_;
};
@@ -7278,13 +7274,13 @@ class HStoreKeyed FINAL
class HStoreKeyedGeneric FINAL : public HTemplateInstruction<4> {
public:
DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P4(HStoreKeyedGeneric, HValue*,
- HValue*, HValue*, StrictMode);
+ HValue*, HValue*, LanguageMode);
HValue* object() const { return OperandAt(0); }
HValue* key() const { return OperandAt(1); }
HValue* value() const { return OperandAt(2); }
HValue* context() const { return OperandAt(3); }
- StrictMode strict_mode() const { return strict_mode_; }
+ LanguageMode language_mode() const { return language_mode_; }
Representation RequiredInputRepresentation(int index) OVERRIDE {
// tagged[tagged] = tagged
@@ -7296,12 +7292,9 @@ class HStoreKeyedGeneric FINAL : public HTemplateInstruction<4> {
DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric)
private:
- HStoreKeyedGeneric(HValue* context,
- HValue* object,
- HValue* key,
- HValue* value,
- StrictMode strict_mode)
- : strict_mode_(strict_mode) {
+ HStoreKeyedGeneric(HValue* context, HValue* object, HValue* key,
+ HValue* value, LanguageMode language_mode)
+ : language_mode_(language_mode) {
SetOperandAt(0, object);
SetOperandAt(1, key);
SetOperandAt(2, value);
@@ -7309,7 +7302,7 @@ class HStoreKeyedGeneric FINAL : public HTemplateInstruction<4> {
SetAllSideEffects();
}
- StrictMode strict_mode_;
+ LanguageMode language_mode_;
};
@@ -7598,7 +7591,9 @@ class HFunctionLiteral FINAL : public HTemplateInstruction<1> {
bool is_concise_method() const { return IsConciseMethod(kind()); }
bool is_default_constructor() const { return IsDefaultConstructor(kind()); }
FunctionKind kind() const { return FunctionKindField::decode(bit_field_); }
- StrictMode strict_mode() const { return StrictModeField::decode(bit_field_); }
+ LanguageMode language_mode() const {
+ return LanguageModeField::decode(bit_field_);
+ }
private:
HFunctionLiteral(HValue* context, Handle<SharedFunctionInfo> shared,
@@ -7608,7 +7603,7 @@ class HFunctionLiteral FINAL : public HTemplateInstruction<1> {
bit_field_(FunctionKindField::encode(shared->kind()) |
PretenureField::encode(pretenure) |
HasNoLiteralsField::encode(shared->num_literals() == 0) |
- StrictModeField::encode(shared->strict_mode())) {
+ LanguageModeField::encode(shared->language_mode())) {
SetOperandAt(0, context);
set_representation(Representation::Tagged());
SetChangesFlag(kNewSpacePromotion);
@@ -7619,7 +7614,8 @@ class HFunctionLiteral FINAL : public HTemplateInstruction<1> {
class FunctionKindField : public BitField<FunctionKind, 0, 4> {};
class PretenureField : public BitField<bool, 5, 1> {};
class HasNoLiteralsField : public BitField<bool, 6, 1> {};
- class StrictModeField : public BitField<StrictMode, 7, 1> {};
+ STATIC_ASSERT(LANGUAGE_END == 2);
+ class LanguageModeField : public BitField<LanguageMode, 7, 1> {};
Handle<SharedFunctionInfo> shared_info_;
uint32_t bit_field_;
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698