Version 2.3.4
Fixed warnings on arm on newer GCC versions.
Fixed a number of minor bugs.
Performance improvements on all platforms.
git-svn-id: http://v8.googlecode.com/svn/trunk@4453 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/objects-inl.h b/src/objects-inl.h
index d363d4d..621a3f8 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -2491,11 +2491,6 @@
}
-bool JSFunction::IsBoilerplate() {
- return map() == Heap::boilerplate_function_map();
-}
-
-
bool JSFunction::IsBuiltin() {
return context()->global()->IsJSBuiltinsObject();
}
@@ -2580,22 +2575,35 @@
int JSFunction::NumberOfLiterals() {
- ASSERT(!IsBoilerplate());
return literals()->length();
}
Object* JSBuiltinsObject::javascript_builtin(Builtins::JavaScript id) {
ASSERT(0 <= id && id < kJSBuiltinsCount);
- return READ_FIELD(this, kJSBuiltinsOffset + (id * kPointerSize));
+ return READ_FIELD(this, OffsetOfFunctionWithId(id));
}
void JSBuiltinsObject::set_javascript_builtin(Builtins::JavaScript id,
Object* value) {
ASSERT(0 <= id && id < kJSBuiltinsCount);
- WRITE_FIELD(this, kJSBuiltinsOffset + (id * kPointerSize), value);
- WRITE_BARRIER(this, kJSBuiltinsOffset + (id * kPointerSize));
+ WRITE_FIELD(this, OffsetOfFunctionWithId(id), value);
+ WRITE_BARRIER(this, OffsetOfFunctionWithId(id));
+}
+
+
+Code* JSBuiltinsObject::javascript_builtin_code(Builtins::JavaScript id) {
+ ASSERT(0 <= id && id < kJSBuiltinsCount);
+ return Code::cast(READ_FIELD(this, OffsetOfCodeWithId(id)));
+}
+
+
+void JSBuiltinsObject::set_javascript_builtin_code(Builtins::JavaScript id,
+ Code* value) {
+ ASSERT(0 <= id && id < kJSBuiltinsCount);
+ WRITE_FIELD(this, OffsetOfCodeWithId(id), value);
+ ASSERT(!Heap::InNewSpace(value));
}