Index: src/hydrogen.cc |
diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
index 77e7778b77ff979fd7657262c74e032e45f73f28..80eff3b552f86cfdaeb9eec6ee3e44320a135b81 100644 |
--- a/src/hydrogen.cc |
+++ b/src/hydrogen.cc |
@@ -8730,6 +8730,58 @@ void HOptimizedGraphBuilder::GenerateTypedArrayMaxSizeInHeap( |
} |
+void HOptimizedGraphBuilder::GenerateArrayBufferGetByteLength( |
+ CallRuntime* expr) { |
+ ASSERT(expr->arguments()->length() == 1); |
+ CHECK_ALIVE(VisitForValue(expr->arguments()->at(0))); |
+ HValue* buffer = Pop(); |
+ HInstruction* result = New<HLoadNamedField>( |
+ buffer, |
+ static_cast<HValue*>(NULL), |
+ HObjectAccess::ForJSArrayBufferByteLength()); |
+ return ast_context()->ReturnInstruction(result, expr->id()); |
+} |
+ |
+ |
+void HOptimizedGraphBuilder::GenerateArrayBufferViewGetByteLength( |
+ CallRuntime* expr) { |
+ ASSERT(expr->arguments()->length() == 1); |
+ CHECK_ALIVE(VisitForValue(expr->arguments()->at(0))); |
+ HValue* buffer = Pop(); |
+ HInstruction* result = New<HLoadNamedField>( |
+ buffer, |
+ static_cast<HValue*>(NULL), |
+ HObjectAccess::ForJSArrayBufferViewByteLength()); |
+ return ast_context()->ReturnInstruction(result, expr->id()); |
+} |
+ |
+ |
+void HOptimizedGraphBuilder::GenerateArrayBufferViewGetByteOffset( |
+ CallRuntime* expr) { |
+ ASSERT(expr->arguments()->length() == 1); |
+ CHECK_ALIVE(VisitForValue(expr->arguments()->at(0))); |
+ HValue* buffer = Pop(); |
+ HInstruction* result = New<HLoadNamedField>( |
+ buffer, |
+ static_cast<HValue*>(NULL), |
+ HObjectAccess::ForJSArrayBufferViewByteOffset()); |
+ return ast_context()->ReturnInstruction(result, expr->id()); |
+} |
+ |
+ |
+void HOptimizedGraphBuilder::GenerateTypedArrayGetLength( |
+ CallRuntime* expr) { |
+ ASSERT(expr->arguments()->length() == 1); |
+ CHECK_ALIVE(VisitForValue(expr->arguments()->at(0))); |
+ HValue* buffer = Pop(); |
+ HInstruction* result = New<HLoadNamedField>( |
+ buffer, |
+ static_cast<HValue*>(NULL), |
+ HObjectAccess::ForJSTypedArrayLength()); |
+ return ast_context()->ReturnInstruction(result, expr->id()); |
+} |
+ |
+ |
void HOptimizedGraphBuilder::VisitCallRuntime(CallRuntime* expr) { |
ASSERT(!HasStackOverflow()); |
ASSERT(current_block() != NULL); |