Added support for API accessors that prohibit overwriting by accessors defined in JavaScript code by using __defineGetter__ and __defineSetter__.
Improved handling of conditionals in test status files.
Introduced access control in propertyIsEnumerable.
Improved performance of some string operations by caching information about the type of the string between operations.
Fixed bug in fast-case code for switch statements that only have integer labels.
git-svn-id: http://v8.googlecode.com/svn/trunk@687 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/factory.cc b/src/factory.cc
index 4b0faef..3b3c2c3 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -90,15 +90,24 @@
Handle<String> Factory::NewConsString(Handle<String> first,
- Handle<String> second) {
- if (first->length() == 0) return second;
- if (second->length() == 0) return first;
- CALL_HEAP_FUNCTION(Heap::AllocateConsString(*first, *second), String);
+ StringShape first_shape,
+ Handle<String> second,
+ StringShape second_shape) {
+ if (first->length(first_shape) == 0) return second;
+ if (second->length(second_shape) == 0) return first;
+ CALL_HEAP_FUNCTION(Heap::AllocateConsString(*first,
+ first_shape,
+ *second,
+ second_shape),
+ String);
}
-Handle<String> Factory::NewStringSlice(Handle<String> str, int begin, int end) {
- CALL_HEAP_FUNCTION(str->Slice(begin, end), String);
+Handle<String> Factory::NewStringSlice(Handle<String> str,
+ StringShape shape,
+ int begin,
+ int end) {
+ CALL_HEAP_FUNCTION(str->Slice(shape, begin, end), String);
}
@@ -725,7 +734,7 @@
// Mark as needs_access_check if needed.
if (obj->needs_access_check()) {
- map->set_is_access_check_needed();
+ map->set_is_access_check_needed(true);
}
// Set interceptor information in the map.