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

Unified Diff: src/fast-accessor-assembler.h

Issue 1674633002: Move FastAccessorAssembler from RawMachineAssembler to CodeStubAssembler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove CodeStubAssembler::ContextParameter. Created 4 years, 9 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/compiler/fast-accessor-assembler.cc ('k') | src/fast-accessor-assembler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/fast-accessor-assembler.h
diff --git a/src/compiler/fast-accessor-assembler.h b/src/fast-accessor-assembler.h
similarity index 79%
rename from src/compiler/fast-accessor-assembler.h
rename to src/fast-accessor-assembler.h
index 1cb751d0265c6d3b7a669df2b8368fe9a7d2d6b5..57e72e8eb1d7e41bc58bad1e0269284ee26c45ef 100644
--- a/src/compiler/fast-accessor-assembler.h
+++ b/src/fast-accessor-assembler.h
@@ -2,19 +2,19 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef V8_COMPILER_FAST_ACCESSOR_ASSEMBLER_H_
-#define V8_COMPILER_FAST_ACCESSOR_ASSEMBLER_H_
+#ifndef V8_FAST_ACCESSOR_ASSEMBLER_H_
+#define V8_FAST_ACCESSOR_ASSEMBLER_H_
#include <stdint.h>
#include <vector>
-// Clients of this interface shouldn't depend on lots of compiler internals.
-// Do not include anything from src/compiler here!
#include "include/v8-experimental.h"
#include "src/base/macros.h"
#include "src/base/smart-pointers.h"
#include "src/handles.h"
+// For CodeStubAssembler::Label. (We cannot forward-declare inner classes.)
+#include "src/compiler/code-stub-assembler.h"
namespace v8 {
namespace internal {
@@ -24,11 +24,8 @@ class Isolate;
class Zone;
namespace compiler {
-
class Node;
-class RawMachineAssembler;
-class RawMachineLabel;
-
+}
// This interface "exports" an aggregated subset of RawMachineAssembler, for
// use by the API to implement Fast Dom Accessors.
@@ -75,21 +72,24 @@ class FastAccessorAssembler {
MaybeHandle<Code> Build();
private:
- ValueId FromRaw(Node* node);
- LabelId FromRaw(RawMachineLabel* label);
- Node* FromId(ValueId value) const;
- RawMachineLabel* FromId(LabelId value) const;
+ ValueId FromRaw(compiler::Node* node);
+ LabelId FromRaw(compiler::CodeStubAssembler::Label* label);
+ compiler::Node* FromId(ValueId value) const;
+ compiler::CodeStubAssembler::Label* FromId(LabelId value) const;
+ void Clear();
Zone* zone() { return &zone_; }
+ Isolate* isolate() const { return isolate_; }
Zone zone_;
- base::SmartPointer<RawMachineAssembler> assembler_;
+ Isolate* isolate_;
+ base::SmartPointer<compiler::CodeStubAssembler> assembler_;
// To prevent exposing the RMA internals to the outside world, we'll map
// Node + Label pointers integers wrapped in ValueId and LabelId instances.
// These vectors maintain this mapping.
- std::vector<Node*> nodes_;
- std::vector<RawMachineLabel*> labels_;
+ std::vector<compiler::Node*> nodes_;
+ std::vector<compiler::CodeStubAssembler::Label*> labels_;
// Remember the current state for easy error checking. (We prefer to be
// strict as this class will be exposed at the API.)
@@ -98,8 +98,7 @@ class FastAccessorAssembler {
DISALLOW_COPY_AND_ASSIGN(FastAccessorAssembler);
};
-} // namespace compiler
} // namespace internal
} // namespace v8
-#endif // V8_COMPILER_FAST_ACCESSOR_ASSEMBLER_H_
+#endif // V8_FAST_ACCESSOR_ASSEMBLER_H_
« no previous file with comments | « src/compiler/fast-accessor-assembler.cc ('k') | src/fast-accessor-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698