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

Unified Diff: src/compiler.h

Issue 7348008: Merge up to 8597 to experimental/gc from the bleeding edge. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: '' Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compilation-cache.cc ('k') | src/compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.h
===================================================================
--- src/compiler.h (revision 8618)
+++ src/compiler.h (working copy)
@@ -89,6 +89,12 @@
bool allows_natives_syntax() const {
return IsNativesSyntaxAllowed::decode(flags_);
}
+ void MarkAsNative() {
+ flags_ |= IsNative::encode(true);
+ }
+ bool is_native() const {
+ return IsNative::decode(flags_);
+ }
void SetFunction(FunctionLiteral* literal) {
ASSERT(function_ == NULL);
function_ = literal;
@@ -167,8 +173,9 @@
void Initialize(Mode mode) {
mode_ = V8::UseCrankshaft() ? mode : NONOPT;
- if (!shared_info_.is_null() && shared_info_->strict_mode()) {
- MarkAsStrictMode();
+ if (!shared_info_.is_null()) {
+ if (shared_info_->strict_mode()) MarkAsStrictMode();
+ if (shared_info_->native()) MarkAsNative();
}
}
@@ -191,7 +198,10 @@
class IsStrictMode: public BitField<bool, 4, 1> {};
// Native syntax (%-stuff) allowed?
class IsNativesSyntaxAllowed: public BitField<bool, 5, 1> {};
+ // Is this a function from our natives.
+ class IsNative: public BitField<bool, 6, 1> {};
+
unsigned flags_;
// Fields filled in by the compilation pipeline.
@@ -289,24 +299,6 @@
};
-// During compilation we need a global list of handles to constants
-// for frame elements. When the zone gets deleted, we make sure to
-// clear this list of handles as well.
-class CompilationZoneScope : public ZoneScope {
- public:
- CompilationZoneScope(Isolate* isolate, ZoneScopeMode mode)
- : ZoneScope(isolate, mode) {}
-
- virtual ~CompilationZoneScope() {
- if (ShouldDeleteOnExit()) {
- Isolate* isolate = Isolate::Current();
- isolate->frame_element_constant_list()->Clear();
- isolate->result_constant_list()->Clear();
- }
- }
-};
-
-
} } // namespace v8::internal
#endif // V8_COMPILER_H_
« no previous file with comments | « src/compilation-cache.cc ('k') | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698