Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: src/parser.cc

Issue 458813002: Prototype implementation of GET_OWN_PROPERTY intrinsic. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ic.cc ('k') | src/runtime.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/ast.h" 8 #include "src/ast.h"
9 #include "src/base/platform/platform.h" 9 #include "src/base/platform/platform.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 3776 matching lines...) Expand 10 before | Expand all | Expand 10 after
3787 3787
3788 // Check that the expected number of arguments are being passed. 3788 // Check that the expected number of arguments are being passed.
3789 if (function != NULL && 3789 if (function != NULL &&
3790 function->nargs != -1 && 3790 function->nargs != -1 &&
3791 function->nargs != args->length()) { 3791 function->nargs != args->length()) {
3792 ReportMessage("illegal_access"); 3792 ReportMessage("illegal_access");
3793 *ok = false; 3793 *ok = false;
3794 return NULL; 3794 return NULL;
3795 } 3795 }
3796 3796
3797 if (function != NULL &&
3798 function->function_id == Runtime::kGET_OWN_PROPERTY) {
3799 return factory()->NewOwnProperty(args->at(0), args->at(1), pos);
3800 }
3801
3797 // Check that the function is defined if it's an inline runtime call. 3802 // Check that the function is defined if it's an inline runtime call.
3798 if (function == NULL && name->FirstCharacter() == '_') { 3803 if (function == NULL && name->FirstCharacter() == '_') {
3799 ParserTraits::ReportMessage("not_defined", name); 3804 ParserTraits::ReportMessage("not_defined", name);
3800 *ok = false; 3805 *ok = false;
3801 return NULL; 3806 return NULL;
3802 } 3807 }
3803 3808
3804 // We have a valid intrinsics call or a call to a builtin. 3809 // We have a valid intrinsics call or a call to a builtin.
3805 return factory()->NewCallRuntime(name, function, args, pos); 3810 return factory()->NewCallRuntime(name, function, args, pos);
3806 } 3811 }
(...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after
4802 info()->SetAstValueFactory(ast_value_factory_); 4807 info()->SetAstValueFactory(ast_value_factory_);
4803 } 4808 }
4804 ast_value_factory_ = NULL; 4809 ast_value_factory_ = NULL;
4805 4810
4806 InternalizeUseCounts(); 4811 InternalizeUseCounts();
4807 4812
4808 return (result != NULL); 4813 return (result != NULL);
4809 } 4814 }
4810 4815
4811 } } // namespace v8::internal 4816 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ic.cc ('k') | src/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698