Revision: 10859
Author: [email protected]
Date: Tue Feb 28 07:32:06 2012
Log: Thread isolate through Property constructor, avoiding
Isolate::Current.
This removes roughly 5k invocations of Isolate::Current from the
string-tagcloud
benchmark.
Review URL: https://chromiumcodereview.appspot.com/9490009
http://code.google.com/p/v8/source/detail?r=10859
Modified:
/branches/bleeding_edge/src/ast.cc
/branches/bleeding_edge/src/ast.h
/branches/bleeding_edge/src/parser.cc
=======================================
--- /branches/bleeding_edge/src/ast.cc Tue Feb 28 02:12:39 2012
+++ /branches/bleeding_edge/src/ast.cc Tue Feb 28 07:32:06 2012
@@ -168,12 +168,15 @@
}
-ObjectLiteral::Property::Property(Literal* key, Expression* value) {
+ObjectLiteral::Property::Property(Literal* key,
+ Expression* value,
+ Isolate* isolate) {
emit_store_ = true;
key_ = key;
value_ = value;
Object* k = *key->handle();
- if (k->IsSymbol() && HEAP->Proto_symbol()->Equals(String::cast(k))) {
+ if (k->IsSymbol() &&
+ isolate->heap()->Proto_symbol()->Equals(String::cast(k))) {
kind_ = PROTOTYPE;
} else if (value_->AsMaterializedLiteral() != NULL) {
kind_ = MATERIALIZED_LITERAL;
=======================================
--- /branches/bleeding_edge/src/ast.h Tue Feb 28 02:12:39 2012
+++ /branches/bleeding_edge/src/ast.h Tue Feb 28 07:32:06 2012
@@ -1257,7 +1257,7 @@
PROTOTYPE // Property is __proto__.
};
- Property(Literal* key, Expression* value);
+ Property(Literal* key, Expression* value, Isolate* isolate);
Literal* key() { return key_; }
Expression* value() { return value_; }
=======================================
--- /branches/bleeding_edge/src/parser.cc Tue Feb 28 02:12:39 2012
+++ /branches/bleeding_edge/src/parser.cc Tue Feb 28 07:32:06 2012
@@ -3991,7 +3991,7 @@
Expression* value = ParseAssignmentExpression(true, CHECK_OK);
ObjectLiteral::Property* property =
- new(zone()) ObjectLiteral::Property(key, value);
+ new(zone()) ObjectLiteral::Property(key, value, isolate());
// Mark top-level object literals that contain function literals and
// pretenure the literal so it can be added as a constant function
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev