Revision: 15338
Author: [email protected]
Date: Wed Jun 26 07:04:25 2013
Log: Remove obsolete unchecked accessors in JSFunction.
[email protected]
BUG=v8:1490
Review URL: https://codereview.chromium.org/17833002
http://code.google.com/p/v8/source/detail?r=15338
Modified:
/branches/bleeding_edge/src/frames.cc
/branches/bleeding_edge/src/heap-snapshot-generator.cc
/branches/bleeding_edge/src/mark-compact.cc
/branches/bleeding_edge/src/objects-inl.h
/branches/bleeding_edge/src/objects-printer.cc
/branches/bleeding_edge/src/objects-visiting-inl.h
/branches/bleeding_edge/src/objects.h
/branches/bleeding_edge/src/string-stream.cc
=======================================
--- /branches/bleeding_edge/src/frames.cc Tue Jun 25 03:09:19 2013
+++ /branches/bleeding_edge/src/frames.cc Wed Jun 26 07:04:25 2013
@@ -741,7 +741,7 @@
Code* JavaScriptFrame::unchecked_code() const {
JSFunction* function = JSFunction::cast(this->function());
- return function->unchecked_code();
+ return function->code();
}
=======================================
--- /branches/bleeding_edge/src/heap-snapshot-generator.cc Tue Jun 25
04:55:33 2013
+++ /branches/bleeding_edge/src/heap-snapshot-generator.cc Wed Jun 26
07:04:25 2013
@@ -1050,9 +1050,9 @@
SetInternalReference(js_fun, entry,
"shared", shared_info,
JSFunction::kSharedFunctionInfoOffset);
- TagObject(js_fun->unchecked_context(), "(context)");
+ TagObject(js_fun->context(), "(context)");
SetInternalReference(js_fun, entry,
- "context", js_fun->unchecked_context(),
+ "context", js_fun->context(),
JSFunction::kContextOffset);
for (int i = JSFunction::kNonWeakFieldsEndOffset;
i < JSFunction::kSize;
=======================================
--- /branches/bleeding_edge/src/mark-compact.cc Mon Jun 24 05:39:02 2013
+++ /branches/bleeding_edge/src/mark-compact.cc Wed Jun 26 07:04:25 2013
@@ -1319,7 +1319,7 @@
InstanceType type = map->instance_type();
if ((type & kShortcutTypeMask) != kShortcutTypeTag) return object;
- Object* second =
reinterpret_cast<ConsString*>(object)->unchecked_second();
+ Object* second = reinterpret_cast<ConsString*>(object)->second();
Heap* heap = map->GetHeap();
if (second != heap->empty_string()) {
return object;
@@ -1328,7 +1328,7 @@
// Since we don't have the object's start, it is impossible to update the
// page dirty marks. Therefore, we only replace the string with its left
// substring when page dirty marks do not change.
- Object* first = reinterpret_cast<ConsString*>(object)->unchecked_first();
+ Object* first = reinterpret_cast<ConsString*>(object)->first();
if (!heap->InNewSpace(object) && heap->InNewSpace(first)) return object;
*p = first;
=======================================
--- /branches/bleeding_edge/src/objects-inl.h Tue Jun 25 07:57:47 2013
+++ /branches/bleeding_edge/src/objects-inl.h Wed Jun 26 07:04:25 2013
@@ -4901,12 +4901,7 @@
Code* JSFunction::code() {
- return Code::cast(unchecked_code());
-}
-
-
-Code* JSFunction::unchecked_code() {
- return reinterpret_cast<Code*>(
+ return Code::cast(
Code::GetObjectFromEntryAddress(FIELD_ADDR(this, kCodeEntryOffset)));
}
@@ -4949,11 +4944,6 @@
Context* JSFunction::context() {
return Context::cast(READ_FIELD(this, kContextOffset));
}
-
-
-Object* JSFunction::unchecked_context() {
- return READ_FIELD(this, kContextOffset);
-}
void JSFunction::set_context(Object* value) {
=======================================
--- /branches/bleeding_edge/src/objects-printer.cc Fri Jun 21 06:02:38 2013
+++ /branches/bleeding_edge/src/objects-printer.cc Wed Jun 26 07:04:25 2013
@@ -864,7 +864,7 @@
PrintF(out, "\n - name = ");
shared()->name()->Print(out);
PrintF(out, "\n - context = ");
- unchecked_context()->ShortPrint(out);
+ context()->ShortPrint(out);
PrintF(out, "\n - literals = ");
literals()->ShortPrint(out);
PrintF(out, "\n - code = ");
=======================================
--- /branches/bleeding_edge/src/objects-visiting-inl.h Fri Jun 21 06:02:38
2013
+++ /branches/bleeding_edge/src/objects-visiting-inl.h Wed Jun 26 07:04:25
2013
@@ -645,7 +645,7 @@
}
// The function must have a valid context and not be a builtin.
- if (!IsValidNonBuiltinContext(function->unchecked_context())) {
+ if (!IsValidNonBuiltinContext(function->context())) {
return false;
}
=======================================
--- /branches/bleeding_edge/src/objects.h Wed Jun 26 01:00:05 2013
+++ /branches/bleeding_edge/src/objects.h Wed Jun 26 07:04:25 2013
@@ -6567,7 +6567,6 @@
// [context]: The context for this function.
inline Context* context();
- inline Object* unchecked_context();
inline void set_context(Object* context);
// [code]: The generated code object for this function. Executed
@@ -6579,8 +6578,6 @@
inline void set_code_no_write_barrier(Code* code);
inline void ReplaceCode(Code* code);
- inline Code* unchecked_code();
-
// Tells whether this function is builtin.
inline bool IsBuiltin();
=======================================
--- /branches/bleeding_edge/src/string-stream.cc Tue Jun 4 03:30:05 2013
+++ /branches/bleeding_edge/src/string-stream.cc Wed Jun 26 07:04:25 2013
@@ -471,7 +471,7 @@
}
JSFunction* fun = JSFunction::cast(f);
- Object* perhaps_context = fun->unchecked_context();
+ Object* perhaps_context = fun->context();
if (perhaps_context->IsHeapObject() &&
heap->Contains(HeapObject::cast(perhaps_context)) &&
perhaps_context->IsContext()) {
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.